package cn.edu.zafu.bigdata.lyq;


    class Animal{
        public void makesound(){
            System.out.println("Animal Sound");
        }
    }
    //Dog
    class Dog extends Animal{
        @Override
        public void makesound(){
            System.out.println("Woof!");
        }
    }
    class Cat extends Animal{
        @Override
        public void makesound(){
            System.out.println("Meow!");
        }
    }


public class TestAnimal {
    public static void main(String[] args) {
        Dog dog = new Dog();
        Cat cat = new Cat();
        dog.makesound();
        cat.makesound();

    }
}